package File;

import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LXW
 * Date: 2022-04-03
 * Time: 21:46
 */
public class Demo7 {
    public static void main(String[] args) throws IOException {
        File file = new File("hello-world");
        File dest = new File("dest-txt");
        System.out.println(file.exists());
        System.out.println(dest.exists());
        System.out.println(file.renameTo(dest));
        System.out.println(file.exists());
        System.out.println(dest.exists());
        System.out.println(file.createNewFile());
    }
}
